package cn.dnui_wnx725.dnuifood_16110100725.model;

import cn.dnui_wnx725.dnuifood_16110100725.bean.CollectBean;
import cn.dnui_wnx725.dnuifood_16110100725.bean.RegistBean;
import cn.dnui_wnx725.dnuifood_16110100725.iface.CollectIface;
import cn.dnui_wnx725.dnuifood_16110100725.listener.TListener;
import cn.dnui_wnx725.dnuifood_16110100725.service.Service;
import retrofit2.Call;
import retrofit2.Retrofit;



public class CollectShopModel extends RetrofitBaseModel implements CollectIface {
    Retrofit retrofit;
    Service service;

    public CollectShopModel(){
        retrofit = getRetrofit();
        service = getService();
    }


    @Override
    public void judge(String userid, String shop_food_id, String flag, TListener<CollectBean> tListener) {
        Call<CollectBean> call = service.getisCollected(userid,shop_food_id,flag);
        callenqueue(call,tListener);
    }

    @Override
    public void collect(String usreid, String shopid, TListener<RegistBean> tListener) {
        Call<RegistBean> call = service.getCollectShop(usreid,shopid);
        callenqueue(call,tListener);
    }

}
